package com.edu.mybatis.mapper;

import com.edu.mybatis.bean.Department;
import com.edu.mybatis.bean.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmployeeStepMapper {
    // 根据id查部门, 并查部门下的所有员工
    Department getDeptByIdWithEmployees(@Param("departmentId") Integer departmentId);

    // 查询某部门下的所有员工
    List<Employee> getEmployeesByDeptId(@Param("departmentId") Integer departmentId);

    // 根据员工id查部门id
    Integer getDeptIdByEmployeeId(@Param("employeeId") Integer employeeId);

    // 根据员工id查其 部门
    Employee getEmployeeById(@Param("employeeId") Integer employeeId);
}
